﻿/*****************************************************************//**
 * @file    FITKAcousticsVTKGraphObjectSEAJunctionLines.h
 * @brief   Graph object base for SEA junction lines data.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-11-19
 *********************************************************************/

#ifndef __FITKACOUSTICSVTKGRAPHOBJECTSEAJUNCTIONLINES_H__
#define __FITKACOUSTICSVTKGRAPHOBJECTSEAJUNCTIONLINES_H__

#include "FITKAcousticsVTKGraphObjectSEAJunctions.h"

#include "FITKAcousticsVTKGraphAdaptorAPI.h"

// Forward declaration
class vtkTubeFilter;

namespace Exchange
{
    /**
     * @brief   Graph object base for 'SEA junction lines'.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-11-19
     */
    class FITKACOUSTICSGRAPHADAPTORAPI FITKAcousticsVTKGraphObjectSEAJunctionLines : public FITKAcousticsVTKGraphObjectSEAJunctions
    {
        // Regist
        FITKGraphObjectRegist(FITKAcousticsVTKGraphObjectSEAJunctionLines, FITKAcousticsVTKGraphObjectSEAJunctions);
        FITKCLASS(Exchange, FITKAcousticsVTKGraphObjectSEAJunctionLines);

    public:
        /**
         * @brief   Constructor.
         * @param   seaModel: The SEA model data
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        FITKAcousticsVTKGraphObjectSEAJunctionLines(Acoustics::FITKAcousticsDiscModel* seaModel);

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        ~FITKAcousticsVTKGraphObjectSEAJunctionLines();

        /**
         * @brief   Get the visibility from the data object.[override]
         * @return  The visibility
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        bool getDataVisibility() override;

    private:
        /**
         * @brief   Intialize.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        void init() override;

        /**
         * @brief   Generate the multi block dataset for the sub-systems.[override]
         * @return  Is the data valid
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        bool generateDataSet() override;

        /**
         * @brief   Generate the actor with the sub-system data.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        void generateGraph() override;

        /**
         * @brief   Update the tube radius by the boundary of all SEA nodes.[override]
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        void updateGlyphSizeByRatio() override;

    private:
        /**
         * @brief   The radius of the tube.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        double m_tubeRadius = 30.;

        /**
         * @brief   The tube filter for the junction lines.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-19
         */
        vtkTubeFilter* m_tubeFilter{ nullptr };
        /**
         * @brief  腔管高亮过滤器
         * @author BaGuijun (baguijun@163.com)
         * @date   2025-02-07
         */
        vtkTubeFilter* m_tubeHightFilter = nullptr;
    };
}   // namespace Exchange

#endif // __FITKACOUSTICSVTKGRAPHOBJECTSEAJUNCTIONLINES_H__
